home *** CD-ROM | disk | FTP | other *** search
/ Georgia Wildfire Prevention / Georgia Wildfire Prevention.iso / pc / media / dirs / BackUp / Firetower.dir / 00001_Script_VRBehavior next >
Text File  |  2002-10-11  |  4KB  |  150 lines

  1. --VR BEHAVIOR--
  2. --Use this behavior to control the QTVR.
  3.  
  4. global Zeus, FrameTalk,ctrlobj
  5. property SpNum, MyMem, MyName, MyHotSpot, MyWindow, MySound, counter,hack,spritenum,mysprite
  6.  
  7. on new me,
  8.   SpNum = me.spritenum
  9.   MyMem = sprite(SpNum).membernum
  10.   MyName = member(MyMem).name
  11.   sprite(SpNum).triggercallback = #HotClick
  12.   sprite(SpNum).hotSpotEnterCallBack = #HotEnter
  13.   sprite(SpNum).hotSpotExitCallBack = #HotExit
  14.   MySound = member("Click").number
  15.   counter = 0
  16.   hack=0
  17.   mysprite=sprite(spritenum)
  18. end
  19.  
  20. --The navigates the movie when a hotspot is clicked.
  21. on HotClick me, HotSpotID
  22.   global stupidhack
  23.   case (HotSpotID) of
  24.     141:hack=1
  25.     35 :      
  26.       stupidhack=["MainMenu",0,0]
  27.       go frame "stupidhack"
  28.       return()
  29.     215 :
  30.       stupidhack=["MainMenu",0,0]
  31.       go frame "stupidhack"
  32.       return()
  33.     185 :
  34.       gotonetpage("http://www.itm-info.com/wildfire/arkansas/index.html")
  35.     17 :
  36.       stupidhack=["campfire",0,0]
  37.       go frame "stupidhack"
  38.       return()
  39.     23 :
  40.       stupidhack=["campfire",0,0]
  41.       go frame "stupidhack"
  42.       return()
  43.     30 :
  44.       stupidhack=["home",0,0]
  45.       go frame "stupidhack"
  46.       return()
  47.     5 :
  48.       stupidhack=["PrescribedBurn",0,0]
  49.       go frame "stupidhack"
  50.       return()
  51.     41:
  52.       stupidhack=["PrescribedBurn",0,0]
  53.       go frame "stupidhack"
  54.       return()
  55.     180 :
  56.       stupidhack=["WildLife",0,0]
  57.       go frame "stupidhack"
  58.       return()
  59.     174 :
  60.       stupidhack=["WildFire",0,0]
  61.       go frame "stupidhack"
  62.       return()
  63.     35 :
  64.       stupidhack=["test",0,"post"]
  65.       go frame "stupidhack"
  66.       return()
  67.     215 :
  68.       stupidhack=["test",0,"post"]
  69.       go frame "stupidhack"
  70.       return()
  71.         end case
  72.   if hack=1 then
  73.     puppetsound 1,"sec4a01"
  74.   else
  75.     sound(1).play(MySound)
  76.   end if
  77. end
  78.  
  79. --This makes the text appear for the rollovers.
  80. on HotEnter me, HotSpotID
  81.   case (HotSpotID) of
  82.     141: MyText = "Click the Radio for Instructions"  
  83.     35 : MyText = "Click here to return to the Main Menu"
  84.     215 : MyText = "Click here to return to the Main Menu"
  85.     185 : MyText = "Click here to go to the References"
  86.     17 : MyText = "Click here to go to Campfire Safety"
  87.     23 : MyText = "Click here to go to Campfire Safety"      
  88.     30 : MyText = "Click here to go to Home Wildfire Safety"
  89.     5: MyText = "Click here to go to Prescribed Burns"
  90.     41: MyText = "Click here to go to Prescribed Burns"
  91.     180 : MyText = "Click here to go to Wildlife"
  92.     174 : MyText = "Click here to go to Wildfire" 
  93.   end case
  94.   member("TextBox").text = MyText
  95. end
  96.  
  97. --This Makes the text disappear when the mouse leaves the hotspot.
  98. on HotExit me, HotSpotID
  99.   member("TextBox").text = ""
  100. end
  101.  
  102. --Swings the tower based on keyboard input
  103. on keyPress me, MyKey
  104.   if MyName = "TOWER" then
  105.     if MyKey = 84 or MyKey = 125 or MyKey = 91 or MyKey = 126 then --UP/DOWN Keys
  106.       case (counter) of
  107.         2 : sprite(SpNum).swing(45, 0, 76.1296, 10) --CampFire
  108.         3 : sprite(SpNum).swing(135, 0, 76.1296, 10) --WildFire
  109.         0 : sprite(SpNum).swing(225, 0, 76.1296, 10) --WildLife/Prescribed
  110.         1 : sprite(SpNum).swing(315, 0, 76.1296, 10) --HomeSafety
  111.       end case
  112.       if counter <3 then
  113.         counter = counter + 1
  114.       else 
  115.         counter = 0
  116.       end if 
  117.     else if MyKey = 86 or MyKey = 123 then --LEFT Key
  118.       sprite(SpNum).pan = sprite(SpNum).pan + 5
  119.     else if MyKey = 88 or MyKey = 124 then -- RIGHT Key
  120.       sprite(SpNum).pan = sprite(SpNum).pan - 5
  121.     end if
  122.   end if
  123. end
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.